#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QObject>
#include <QThread>
class MyThread : public QThread
{
    Q_OBJECT
public:
    explicit MyThread(QObject * parent = nullptr);
    ~MyThread() override;
    void closeThread();
protected:
    //复写run方法
    virtual void run() override;
private:
    //线程是否运行 volatile修饰
    volatile bool isStop;
};

#endif // MYTHREAD_H
